package com.gaogzhen.juc.visibility.volatileTest;

public class Test04 {
    static int x;

    public static void main(String[] args) throws InterruptedException {
        Thread t1 = new Thread(() -> {
            x = 10;
        }, "t1");
        t1.start();
        t1.join();
        System.out.println(x);
    }
}
